<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加话题</title>
<include file="Public/header" />
<link type="text/css" rel="stylesheet" href="__CSS__/myup.css" />
<link rel="stylesheet" href="__PUBLIC__/kindeditor-4.1.10/themes/default/default.css" />
<script charset="utf-8" src="__PUBLIC__/kindeditor-4.1.10/kindeditor-min.js"></script>
<script charset="utf-8" src="__PUBLIC__/kindeditor-4.1.10/lang/zh_CN.js"></script>
<script charset="utf-8" src="__PUBLIC__/Js/jquery-1.7.2.min.js"></script>
<script charset="utf-8" src="__PUBLIC__/Js/jquery.validate.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/myup.js"></script>
<script type="text/javascript">
$(function(){
	 $("#myform").validate({
     	 rules: {
     	 	title : {required: true,},
            type_id : {required: true,},
     	 },
     	 messages : {
     	 	title : {required: '请输入标题！',},
            type_id : {required: '请选择分类！',},
     	 },
     })
})	
</script>
<script type="text/javascript">
    var editor ;
	KindEditor.ready(function(K) {
		
		editor = K.create('textarea[name="content"]', {
			resizeType : 1,
            newlineTag: 'br',
			allowPreviewEmoticons : false,
			allowImageUpload : true,
			uploadJson : '<{:api_url("Kindeditor/uploadJson")}>',
			urlType : 'absolute',
			
		});
					var editor = K.editor({
					allowFileManager : true
				});
				
				K('#J_selectImage').click(function() {
				editor= K.editor({
	                uploadJson : '<{:api_url("Kindeditor/uploadJson")}>?path=content',
					allowFileManager : true
				});
					editor.loadPlugin('multiimage', function() {
						editor.plugin.multiImageDialog({
							clickFn : function(urlList) {
								K.each(urlList, function(i, data) {
									appendImg(data.url)
								});
								editor.hideDialog();
							}
						});
					});
				});	
	 
	});
	
</script>

 
</head>


<body>

        <div class="list_vmall_man">
          <div class="list_vmall_le">
        	   <include file="./Apps/BoxAdmin/View/Public/adminMenu.html" />
           </div>
            <div class="list_vmall_rig">
            <ul class="breadcrumb">
                    <li><a href="<{:U('index')}>">帖子分类</a></li>
                    <li ><a href="<{:U('Group/topic',array('group_id'=>$pid,'type'=>$type))}>"><{$pidName}></a></li>
                    <li class="active">创建/修改帖子</li>
                </ul>
            	 <form enctype="multipart/form-data" action="<{:U('group/add_topic')}>" method="post" id="myform">
            	  <input type="hidden"  name="id" value="<{$data.id}>">
                <div class="list_vmall_bort">
                	<div class="vmall_padi">
                    	<div class="vmall_cle">
                            <label for="input-title" class="vmall_te_le">标题</label>
                            <div class="vmaal_rols">
                                <input type="text" class="vmaal_sinw1 input_a1 int_wod" id="title" name="title" value="<{$data.title}>">
       
                            </div>
                        </div>
						<div class="vmall_cle">
                            <label  class="vmall_te_le">所属圈子</label>
                            <div class="vmaal_rols">
                              <input type="text" class="vmaal_sinw1 input_a1 int_wod" id="author" disabled="disabled" value="<{$pidName}>">    <input type="hidden" name="pid" value="<{$pid}>" />
                            </div>
                        </div>
                        
                        <div class="vmall_cle">
                            <label for="input-title" class="vmall_te_le">类型</label>
                            <div class="vmaal_rols">
                                 <input type="text"  class="vmaal_sinw1 input_a1 int_wod" readonly="readonly" name="type" value="<{$type}>" />
                            </div>
                        </div>
			
						<div class="vmall_cle">
                            <label for="input-title" class="vmall_te_le">作者用户ID</label>
                            <div class="vmaal_rols">
                                <input type="text" class="vmaal_sinw1 input_a1 int_wod" id="author" name="user_id" value="<{$data.user_id}>">
       
                            </div>
                        </div>
                         
 

                        <div class="vmall_cle">
                            <label for="textarea-content" class="vmall_te_le">内容</label>
                            <div class="vmaal_rols">
                                <textarea style="width: 680px; height: 400px;" class="input_a1" id="textarea-content" name="content" rows="2"><{$data.content}></textarea>
                                <div style=" margin-top:6px;" class="vall_alert vall_tx2">
                                建议：介绍中的最佳图片宽度为480px 高度不限
                                <br>
                                为保证手机在非WIFI环境下顺畅浏览网页，建议图片总量不超过5张
                                </div>
                            </div>
                        </div>
                       
                        <div class="vmall_cle">
                            <div class="vmaal_rols">
                                <button class="v_mall_q_1" style="border:0; height:32px; padding-top:0; cursor:pointer;" type="submit">确认保存</button>
                            </div>
                        </div>
                        
                      
                        
                    </div>
                </div>
                </form>
            </div>
            

        </div>

</body>
</html>
